Google News
logo
JavaScript - Interview Questions
How to know if the event.preventDefault() method was used in an element?
We can use the event.defaultPrevented property in the event object. It returns a boolean indicating if the event.preventDefault() was called in a particular element.
Advertisement